#ifndef _PATH_H_
#define _PATH_H_

#include <string>

namespace Path {

	static std::string getParentPath(const std::string& path) {
		int i = path.find_last_of("/\\");
		if (i != -1)
			return path.substr(0, i);
		else
			return "";
	}

	static std::string join(const std::string& p1, const std::string& p2)
	{
		int i = p1.find_last_of("/\\");
		if (i != p1.length() - 1)
			return p1 + "/" + p2;
		else
			return p1 + p2;
	}
}

#endif//_PATH_H_
